#include "util_mouseinput.h"

void LJMUUtilMouseInput::initMouseInput()
{
	this->_btn_lm = false;
	this->_btn_rm = false;
	this->_prev_x = 0;
	this->_prev_y = 0;
	this->_curr_x = 0;
	this->_curr_y = 0;
}

void LJMUUtilMouseInput::setLeftButtonClicked(bool pclicked)
{
	this->_btn_lm = pclicked;
}

void LJMUUtilMouseInput::setRightButtonClicked(bool pclicked)
{
	this->_btn_rm = pclicked;
}
	
void LJMUUtilMouseInput::setCurrentPos(int px, int py)
{
	this->_prev_x = this->_curr_x;
	this->_prev_y = this->_curr_y;
	this->_curr_x = px;
	this->_curr_y = py;
}

bool LJMUUtilMouseInput::isLeftButtonClicked()
{
	return this->_btn_lm;
}

bool LJMUUtilMouseInput::isRightButtonClicked()
{
	return this->_btn_rm;
}

float LJMUUtilMouseInput::getCurrentXPos()
{
	return this->_curr_x;
}

float LJMUUtilMouseInput::getCurrentYPos()
{
	return this->_curr_y;
}

float LJMUUtilMouseInput::getPrevXPos()
{
	return this->_prev_x;
}

float LJMUUtilMouseInput::getPrevYPos()
{
	return this->_prev_y;
}